#!/bin/bash

#ARCH=amd64
ARCH=rk3588
#ARCH=c600
#ARCH=mips32

MODEL=${ARCH}

dirpath=build-$ARCH

#CMAKE_FLAGS="-DOPENCV=ON"
#CMAKE_FLAGS+=" -DOPENGL=ON -DWITH_QT=ON"
#CMAKE_FLAGS+=" -DCODEC=ON"
#CMAKE_FLAGS+=" -DCMAUTOTEST=ON"
#CMAKE_FLAGS+=" -DWITH_DATABASE=ON"
#CMAKE_FLAGS+=" -DWITH_LIBCURL=ON"
#CMAKE_FLAGS+=" -DWITH_COAP=ON"
CMAKE_FLAGS+=" -DWITH_VDEV=ON"
CMAKE_FLAGS+=" -DWITH_LGVL=ON"
CMAKE_FLAGS+=" -DDISABLE_RGA=OFF"
#CMAKE_FLAGS+=" -DWITH_DBUSCPP=ON"

if [ "$ARCH" = "c600" ]; then
	CMAKE_FLAGS+=" -DWITH_GCC_HIGH=OFF"
fi

mkdir $dirpath

cd $dirpath
cmake -DMODEL=${MODEL} .. \
	$CMAKE_FLAGS -DLINUX=ON

make VERBOSE=yes
